package com.example.tool.adapter;

import android.content.Context;
import android.support.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.tool.R;
import com.example.tool.bean.CommonBean;

import java.util.HashMap;
import java.util.List;

/**
 * Created Date 2019/9/23
 *
 * @author liangkun
 * description：时间线
 */
public class TimeAxleAdapter extends BaseQuickAdapter<HashMap<String, Object>, BaseViewHolder> {
    private Context context;

    public TimeAxleAdapter(Context context, List<HashMap<String, Object>> list) {
        super(R.layout.list_calender_cell, list);
        this.context = context;
    }

    /**
     * Implement this method and use the helper to adapt the view to the given item.
     *
     * @param helper A fully initialized helper.
     * @param item   The item that needs to be displayed.
     */
    @Override
    protected void convert(@NonNull BaseViewHolder helper, HashMap<String, Object> item) {
        // 绑定数据到ViewHolder里面
        helper.setText(R.id.Itemtitle, item.get("ItemTitle").toString());
        helper.setText(R.id.Itemtext, item.get("ItemText").toString());
    }

}
